
<%@ page import="com.consorzioimpresa.resuite.domain.Immobile"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="layout" content="springSecurityUI" />
<g:set var="entityName"
	value="${message(code: 'immobile.label', default: 'Immobile')}" />
<title>Visualizza Immobile</title>
</head>
<body>
	<div class="nav">
		<%--            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>--%>
		<span class="menuButton"><g:link class="list" action="list">
				Lista Immobili
			</g:link></span> <span class="menuButton"><g:link class="create"
				action="create">
				Crea Nuovo Immobile
			</g:link></span>
	</div>
	<div class="body">
		<h1>
			Visualizzazione Immobile
		</h1>
		<g:if test="${flash.message}">
			<div class="message">
				${flash.message}
			</div>
		</g:if>
		<div class="dialog">
			<table>
				<tbody>
				<tr><th width="40%">
						</th>

						</tr>

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="immobile.id.label" default="Id" /></td>

						<td valign="top" class="value">
							${fieldValue(bean: immobileInstance, field: "id")}
						</td>

					</tr>
					
					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="immobile.nome.label" default="Nome" /></td>

						<td valign="top" class="value">
							${fieldValue(bean: immobileInstance, field: "nome")}
						</td>

					</tr>
					
					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="immobile.descrizione.label" default="Descrizione" /></td>

						<td valign="top" class="value">
							${fieldValue(bean: immobileInstance, field: "descrizione")}
						</td>

					</tr>
					
					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="immobile.tipologia.label" default="Tipologia" /></td>

						<td valign="top" class="value"><g:link
								controller="tipologiaImmobile" action="show"
								id="${immobileInstance?.tipologia?.id}">
								${immobileInstance?.tipologia}
							</g:link></td>

					</tr>
					
					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="immobile.zona.label" default="Zona" /></td>

						<td valign="top" class="value">
							${fieldValue(bean: immobileInstance, field: "zona")}
						</td>

					</tr>
					
					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="immobile.CAP.label" default="CAP" /></td>

						<td valign="top" class="value">
							${fieldValue(bean: immobileInstance, field: "CAP")}
						</td>

					</tr>
					
					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="immobile.indirizzo.label" default="Indirizzo" /></td>

						<td valign="top" class="value">
							${fieldValue(bean: immobileInstance, field: "indirizzo")}
						</td>

					</tr>
					
					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="immobile.metriQuadri.label" default="Metri Quadri" /></td>

						<td valign="top" class="value">
							${fieldValue(bean: immobileInstance, field: "metriQuadri")}
						</td>

					</tr>
					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="immobile.numeroVani.label" default="Numero Vani" /></td>

						<td valign="top" class="value">
							${fieldValue(bean: immobileInstance, field: "numeroVani")}
						</td>

					</tr>
					
					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="immobile.prezzo.label" default="Prezzo" /></td>

						<td valign="top" class="value">
							${fieldValue(bean: immobileInstance, field: "prezzo")}
						</td>

					</tr>
					
					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="immobile.agente.label" default="Agente" /></td>

						<td valign="top" class="value"><g:link controller="agente"
								action="show" id="${immobileInstance?.agente?.id}">
								${immobileInstance?.agente}
							</g:link></td>

					</tr>
					
					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="immobile.anteprima.label" default="Anteprima" /></td>

						<td valign="top" class="value"><g:link controller="immagine"
								action="show" id="${immobileInstance?.anteprima?.id}">
								<img width="70px" height="70px" class="Photo" id="preview"
										src="${createLink(controller:'site', action:'viewImage', id:immobileInstance?.anteprima?.id)}" />
							</g:link>
						
						 			
						</td>

					</tr>
					
					

					<tr class="prop">
						<td valign="top" class="name"><g:message
								code="immobile.images.label" default="Images" /></td>

						<td valign="top" style="text-align: left;" class="value">
							<ul>
								<g:each in="${immobileInstance.images}" var="i">
									<g:link controller="immagine" action="show"
											id="${i.id}">
											<img width="70px" height="70px" class="Photo" id="preview"
										src="${createLink(controller:'site', action:'viewImage', id:i?.id)}" />
											
										</g:link>
								</g:each>
							</ul>
						</td>

					</tr>
										<tr class="prop">
						<td valign="top" class="name"><label for=isPrimoPiano><g:message
									code="contatto.isAnteprima.label" default="E' in Primo Piano ?" /></label>
						</td>
						<td valign="top"
							class="value ${hasErrors(bean: immobileInstance, field: 'isPrimoPiano', 'errors')}">
							<g:checkBox name="isPrimoPiano"
								value="${immobileInstance?.isPrimoPiano}" />
						</td>
					</tr>
					<tr class="prop">
						<td valign="top" class="name"><label for="isPropostaFutura"><g:message
									code="contatto.isAnteprima.label"
									default="E' una Proposta Futura ?" /></label></td>
						<td valign="top"
							class="value ${hasErrors(bean: immobileInstance, field: 'isPropostaFutura', 'errors')}">
							<g:checkBox name="isPropostaFutura"
								value="${immobileInstance?.isPropostaFutura}" />
						</td>
					</tr>

				</tbody>
			</table>
		</div>
		<div class="buttons">
			<g:form>
				<g:hiddenField name="id" value="${immobileInstance?.id}" />
				<span class="button"><g:actionSubmit class="edit"
						action="edit"
						value="Modifica" /></span>
				<span class="button"><g:actionSubmit class="delete"
						action="delete"
						value="Elimina"
						onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
			</g:form>
		</div>
	</div>
</body>
</html>
